import React, { Component } from 'react';
import {BrowserRouter, Route, Switch} from 'react-router-dom'
import { Provider } from 'react-redux'
import store from './store'
import {GlobalStyle, Iconfont} from './style'
import Header from './common/header/index'
import Home from './pages/home'
import Detail from './pages/detail'
import Login from './pages/login'

class App extends Component {
  render() {
    return (
      <React.Fragment>
        <Provider store={store}>
          <div className="mm">
           
            <BrowserRouter>
              <div>
                <Header />
                <Switch>
                  <Route path="/detail" component={Detail}></Route>
                  <Route path="/login" component={Login}></Route>
                  <Route path="/" component={Home}></Route>
                </Switch>
              </div>
              
            </BrowserRouter>
          </div>
          
        </Provider>
        <GlobalStyle/>
        <Iconfont/>
      </React.Fragment>
    );
  }
}

export default App;
